<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css" />
</head>
<style>
    html,
    body {
        background-color: #fff;
    }

    .placeholder_div {
        background-color: #fbf9f9;
    }
</style>

<body>
    <div  id="app" v-cloak>
        <div class="placeholder_div"></div>

        <div v-html="rich_text" style="padding: 0.5rem;"></div>
    </div>
</body>

</html>
<script src="../script/set_root.js"></script>

<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/zepto.min.js"></script>
<script type="text/javascript" src="../script/hb.js"></script>
<script type="text/javascript" src="../script/vue.js"></script>
<script type="text/javascript">
    apiready = function () {
        hb_ready();
        if (api.pageParam.id) {
            app.type = api.pageParam.id
        } else {
            app.type = "common_problem"
        }

        get_ajax("portal/page/findByType", {
            type: app.type
        }, function (res, err) {
            if (res.code == 200) {
                // alert(JSON.stringify(res))
                app.rich_text = res.data.content
            } else {
                alert("网络不通畅，请稍后再试~")
            }
        })
    }
    //使用vue对数据进行绑定
    var app = new Vue({
        el: '#app',
        data: {
            type: "",
            rich_text:"",
        },
        methods: {

        },

    })
</script>